﻿<UserControl x:Class="WMSSoft.WinKStart.UserControls.ContentActions"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="280" d:DesignWidth="454">
    <WrapPanel Margin="5" Background="{DynamicResource {x:Static SystemColors.WindowBrushKey}}" Visibility="Visible">
        <ListView x:Name="lsv_ActionItems" VerticalContentAlignment="Center" HorizontalContentAlignment="Stretch" Height="234" Width="452" ItemsSource="{Binding Data}" SelectedItem="{Binding SelectedDataItem}">
            <ListView.View>
                <GridView>
                    <GridViewColumn Header="Name" DisplayMemberBinding="{Binding Name}" Width="100"/>
                    <GridViewColumn Header="SourceElement" DisplayMemberBinding="{Binding EventSourceElement}" Width="200" />
                    <GridViewColumn Header="Function" DisplayMemberBinding="{Binding Function}" Width="100"/>
                </GridView>
            </ListView.View>
        </ListView>
        <Button Content="{Binding Cmd_Add.ViewName}" Height="23" Width="100" Margin="10,8,0,0" IsEnabled="true" Command="{Binding Cmd_Add.Command}" CommandParameter="{Binding ElementName=lsv_ActionItems}"/>
        <Button Content="{Binding Cmd_Edit.ViewName}" Height="23" Width="100" Margin="10,8,0,0" IsEnabled="{Binding CanWorkWithItems}" Command="{Binding Cmd_Edit.Command}" CommandParameter="{Binding ElementName=lsv_ActionItems}"/>
        <Button Content="{Binding Cmd_Delete.ViewName}" Width="100" Height="23" Margin="10,8,0,0" IsEnabled="{Binding CanWorkWithItems}" Command="{Binding Cmd_Delete.Command}" CommandParameter="{Binding ElementName=lsv_ActionItems}"/>
    </WrapPanel>
</UserControl>
